Rank-Nullity Theorem

Introduction

The Rank–Nullity Theorem is one of the most elegant results in linear algebra. It reveals a deep structural balance inside every linear transformation: the dimension of the input space is partitioned into two complementary pieces—one measuring how much information is preserved (rank), and the other measuring how much information collapses to zero (nullity).

This article assumes you already understand:

Our goal is to show how these ideas fit together into a single, powerful identity.

Linear transformations and dimensions

Consider a linear transformation $$T : \mathbb{R}^n \to \mathbb{R}^m.$$ Key facts:

These two subspaces—image and null space—capture everything that can happen to a vector under $T$:

The Rank–Nullity Theorem

The theorem states: $$\text{rank}(T) + \text{nullity}(T) = n.$$ Or, for a matrix $A$ with $n$ columns: $$\text{rank}(A) + \text{nullity}(A) = n.$$ Interpretation:

Why the balance holds

A matrix $A$ with $n$ columns defines a transformation $T(x) = Ax$. When we row‑reduce $A$:

Thus:

So the identity is built directly into the structure of row‑reduction.

Geometric intuition

Think of $T$ as reshaping space:

Examples:

This balance is unavoidable: increasing one decreases the other.

Examples

Example 1: A full‑rank matrix

Let $$A = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}.$$

Nothing collapses; everything is preserved.

Example 2: A projection

Let $$A = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}.$$

One dimension survives; one collapses.

Example 3: A wide matrix

Let $$A = \begin{bmatrix} 1 & 2 & 3 \\ 0 & 0 & 0 \end{bmatrix}.$$

Two degrees of freedom go to zero; one survives.

Applications

Exercises

  1. A $5 \times 7$ matrix has rank $4$. What is its nullity?

    Solution

    Nullity = $7 - 4 = 3$.
  2. Suppose a matrix $A$ has $10$ columns and nullity $3$. What is $\text{rank}(A)$?

    Solution

    Rank = $10 - 3 = 7$.
  3. A linear transformation $T : \mathbb{R}^6 \to \mathbb{R}^4$ has rank $2$. Compute its nullity.

    Solution

    Nullity = $6 - 2 = 4$.
  4. True or false: If a matrix has nullity $0$, then it must be square.

    Solution

    False. A wide matrix can have nullity $0$ if all columns are pivot columns.
  5. Give an example of a $3 \times 3$ matrix with rank $1$ and explain why its nullity must be $2$.

    Solution

    Example: $$A = \begin{bmatrix} 1 & 0 & 0 \\ 2 & 0 & 0 \\ -1 & 0 & 0 \end{bmatrix}.$$ Only one pivot column $\Rightarrow$ rank $=1$.
    Since there are $3$ columns, nullity $= 3 - 1 = 2$.
  6. A matrix $A$ has $8$ columns. After row‑reduction, you find $5$ pivot columns. What is the nullity?

    Solution

    Nullity = $8 - 5 = 3$.
  7. Consider a projection matrix onto a line in $\mathbb{R}^3$. What are its rank and nullity?

    Solution

    Rank = $1$ (the line), nullity = $2$ (the plane perpendicular to the line).
  8. Let $A$ be a $4 \times 6$ matrix with nullity $4$. What is its rank?

    Solution

    Rank = $6 - 4 = 2$.